<template>
	<view class="container">
		<view class="list_view">
			<view class="item_view" style="position: relative;" v-for="(item,index) in dataList" :key="index"
				@click="showAction(item, index)">
				<view class="icon_view" style="position: absolute;left: 20rpx;right: 20rpx;top: 40rpx;">
					<image :src="item.cardColor" style="width: 100%;height: 100%;">
					</image>
					<view class="" style="position: absolute;top: 40rpx;left: 150rpx;right: 10rpx;">
						<view class="Text33" style="color: #FFFFFF;">
							{{ item.cardName }}
						</view>
						<view class="Text66" style="color: #FFFFFF;">
							{{ item.deviceName }}
						</view>
					</view>
				</view>
			</view>
		</view>
		<u-empty text="暂无数据" mode="list" v-if="dataList.length==0" :margin-top="300"></u-empty>
	</view>
</template>

<script>
	export default {
		components: {},
		data() {
			return {
				tenantName: '',
				tenantId: '',
				dataList: [],
			}
		},
		onLoad() {
			let sUserInfo = this.$storage.getStorageDataSync("sUserInfo")
			this.tenantId = sUserInfo.tenantId
			this.tenantName = sUserInfo.tenantName
			this.dataList = this.$Route.query.dataList
		},
		methods: {
			showAction(item, index) {
				this.$Router.push({
					name: 'cardShow',
					params: {
						dataList: this.dataList,
						cardIndex: index
					}
				})
			},
		}
	}
</script>

<style lang="scss" scoped>
	.container {
		width: 100%;
		min-height: 100vh;
		box-sizing: border-box;
		background-color: #F8F8F8;
	}

	.list_view {
		width: 100%;
		height: 100%;
		display: flex;
		flex-direction: column;
		justify-content: center;
		align-items: center;

		.item_view {
			width: 100%;
			height: 100rpx;
			display: flex;
			flex-direction: column;
			justify-content: center;
			align-items: center;
			padding-top: 200rpx;

			.icon_view {
				height: 340rpx;
				display: flex;
				justify-content: center;
				align-items: center;
			}
		}
	}
</style>